import { createApp } from 'vue';
import pinia from '/@/stores/index';
import App from '/@/App.vue';
import router from '/@/router';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import other from '/@/utils/other';

import ElementPlus from 'element-plus';
import '/@/theme/index.scss';
import VueGridLayout from 'vue-grid-layout';

// 引入 UEditor 富文本插件
import '../public/UEditor/ueditor.config.js';
import '../public/UEditor/ueditor.all.min.js';
import '../public/UEditor/lang/zh-cn/zh-cn.js';
import '../public/UEditor/themes/default/css/ueditor.css'; // 确保引入 UEditor 的 CSS 文件


  const app = createApp(App);

  directive(app);
  other.elSvg(app);

  app.use(pinia).use(router).use(ElementPlus).use(i18n).use(VueGridLayout).mount('#app');
  // 如果您正在使用CDN引入，请删除下面一行。
  import * as ElementPlusIconsVue from '@element-plus/icons-vue'

  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }